
package com.itjob.scott.language.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.itjob.scott.language.dao.LanguageDao;
import com.itjob.scott.language.entity.LanguageEntity;

@Repository
public class LanguageDaoImpl implements LanguageDao {
	
	@Resource
	private JdbcTemplate template;

	public List<LanguageEntity> queryAll() {
		String sql = "select id, language_key languageKey, language_value languageValue from sims_language_t";
		return template.query(sql, new BeanPropertyRowMapper<LanguageEntity>(LanguageEntity.class));
	}

}
